3.167 \(\int (a+b \tanh ^{-1}(\frac{c}{x^2})) \, dx\)

Optimal. Leaf size=44 \[ a x+b x \tanh ^{-1}\left (\frac{c}{x^2}\right )+b \sqrt{c} \tan ^{-1}\left (\frac{x}{\sqrt{c}}\right )-b \sqrt{c} \tanh ^{-1}\left (\frac{x}{\sqrt{c}}\right ) \]

[Out]

a*x + b*Sqrt[c]*ArcTan[x/Sqrt[c]] + b*x*ArcTanh[c/x^2] - b*Sqrt[c]*ArcTanh[x/Sqrt[c]]

________________________________________________________________________________________

Rubi [A]  time = 0.0244142, antiderivative size = 44, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 10, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.5, Rules used = {6091, 263, 298, 203, 206} \[ a x+b x \tanh ^{-1}\left (\frac{c}{x^2}\right )+b \sqrt{c} \tan ^{-1}\left (\frac{x}{\sqrt{c}}\right )-b \sqrt{c} \tanh ^{-1}\left (\frac{x}{\sqrt{c}}\right ) \]

Antiderivative was successfully verified.

[In]

Int[a + b*ArcTanh[c/x^2],x]

[Out]

a*x + b*Sqrt[c]*ArcTan[x/Sqrt[c]] + b*x*ArcTanh[c/x^2] - b*Sqrt[c]*ArcTanh[x/Sqrt[c]]

Rule 6091

Int[ArcTanh[(c_.)*(x_)^(n_)], x_Symbol] :> Simp[x*ArcTanh[c*x^n], x] - Dist[c*n, Int[x^n/(1 - c^2*x^(2*n)), x]
, x] /; FreeQ[{c, n}, x]

Rule 263

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Int[x^(m + n*p)*(b + a/x^n)^p, x] /; FreeQ[{a, b, m
, n}, x] && IntegerQ[p] && NegQ[n]

Rule 298

Int[(x_)^2/((a_) + (b_.)*(x_)^4), x_Symbol] :> With[{r = Numerator[Rt[-(a/b), 2]], s = Denominator[Rt[-(a/b),
2]]}, Dist[s/(2*b), Int[1/(r + s*x^2), x], x] - Dist[s/(2*b), Int[1/(r - s*x^2), x], x]] /; FreeQ[{a, b}, x] &
&  !GtQ[a/b, 0]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \left (a+b \tanh ^{-1}\left (\frac{c}{x^2}\right )\right ) \, dx &=a x+b \int \tanh ^{-1}\left (\frac{c}{x^2}\right ) \, dx\\ &=a x+b x \tanh ^{-1}\left (\frac{c}{x^2}\right )+(2 b c) \int \frac{1}{\left (1-\frac{c^2}{x^4}\right ) x^2} \, dx\\ &=a x+b x \tanh ^{-1}\left (\frac{c}{x^2}\right )+(2 b c) \int \frac{x^2}{-c^2+x^4} \, dx\\ &=a x+b x \tanh ^{-1}\left (\frac{c}{x^2}\right )-(b c) \int \frac{1}{c-x^2} \, dx+(b c) \int \frac{1}{c+x^2} \, dx\\ &=a x+b \sqrt{c} \tan ^{-1}\left (\frac{x}{\sqrt{c}}\right )+b x \tanh ^{-1}\left (\frac{c}{x^2}\right )-b \sqrt{c} \tanh ^{-1}\left (\frac{x}{\sqrt{c}}\right )\\ \end{align*}

Mathematica [A]  time = 0.0158426, size = 54, normalized size = 1.23 \[ a x+b x \tanh ^{-1}\left (\frac{c}{x^2}\right )+\frac{1}{2} b \sqrt{c} \left (\log \left (\sqrt{c}-x\right )-\log \left (\sqrt{c}+x\right )+2 \tan ^{-1}\left (\frac{x}{\sqrt{c}}\right )\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[a + b*ArcTanh[c/x^2],x]

[Out]

a*x + b*x*ArcTanh[c/x^2] + (b*Sqrt[c]*(2*ArcTan[x/Sqrt[c]] + Log[Sqrt[c] - x] - Log[Sqrt[c] + x]))/2

________________________________________________________________________________________

Maple [A]  time = 0.01, size = 39, normalized size = 0.9 \begin{align*} ax+bx{\it Artanh} \left ({\frac{c}{{x}^{2}}} \right ) -{\it Artanh} \left ({\frac{1}{x}\sqrt{c}} \right ) \sqrt{c}b+b\arctan \left ({x{\frac{1}{\sqrt{c}}}} \right ) \sqrt{c} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(a+b*arctanh(c/x^2),x)

[Out]

a*x+b*x*arctanh(c/x^2)-arctanh(1/x*c^(1/2))*c^(1/2)*b+b*arctan(x/c^(1/2))*c^(1/2)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+b*arctanh(c/x^2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.76386, size = 351, normalized size = 7.98 \begin{align*} \left [\frac{1}{2} \, b x \log \left (\frac{x^{2} + c}{x^{2} - c}\right ) + b \sqrt{c} \arctan \left (\frac{x}{\sqrt{c}}\right ) + \frac{1}{2} \, b \sqrt{c} \log \left (\frac{x^{2} - 2 \, \sqrt{c} x + c}{x^{2} - c}\right ) + a x, \frac{1}{2} \, b x \log \left (\frac{x^{2} + c}{x^{2} - c}\right ) + b \sqrt{-c} \arctan \left (\frac{\sqrt{-c} x}{c}\right ) + \frac{1}{2} \, b \sqrt{-c} \log \left (\frac{x^{2} + 2 \, \sqrt{-c} x - c}{x^{2} + c}\right ) + a x\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+b*arctanh(c/x^2),x, algorithm="fricas")

[Out]

[1/2*b*x*log((x^2 + c)/(x^2 - c)) + b*sqrt(c)*arctan(x/sqrt(c)) + 1/2*b*sqrt(c)*log((x^2 - 2*sqrt(c)*x + c)/(x
^2 - c)) + a*x, 1/2*b*x*log((x^2 + c)/(x^2 - c)) + b*sqrt(-c)*arctan(sqrt(-c)*x/c) + 1/2*b*sqrt(-c)*log((x^2 +
 2*sqrt(-c)*x - c)/(x^2 + c)) + a*x]

________________________________________________________________________________________

Sympy [A]  time = 16.7275, size = 473, normalized size = 10.75 \begin{align*} a x + b \left (\begin{cases} 0 & \text{for}\: c = 0 \\- \infty x & \text{for}\: c = - x^{2} \\\infty x & \text{for}\: c = x^{2} \\- \frac{2 c^{\frac{21}{2}} x \operatorname{atanh}{\left (\frac{c}{x^{2}} \right )}}{- 2 c^{\frac{21}{2}} + 2 c^{\frac{17}{2}} x^{4}} + \frac{2 c^{\frac{17}{2}} x^{5} \operatorname{atanh}{\left (\frac{c}{x^{2}} \right )}}{- 2 c^{\frac{21}{2}} + 2 c^{\frac{17}{2}} x^{4}} - \frac{2 c^{11} \log{\left (- \sqrt{c} + x \right )}}{- 2 c^{\frac{21}{2}} + 2 c^{\frac{17}{2}} x^{4}} + \frac{c^{11} \log{\left (- i \sqrt{c} + x \right )}}{- 2 c^{\frac{21}{2}} + 2 c^{\frac{17}{2}} x^{4}} + \frac{i c^{11} \log{\left (- i \sqrt{c} + x \right )}}{- 2 c^{\frac{21}{2}} + 2 c^{\frac{17}{2}} x^{4}} + \frac{c^{11} \log{\left (i \sqrt{c} + x \right )}}{- 2 c^{\frac{21}{2}} + 2 c^{\frac{17}{2}} x^{4}} - \frac{i c^{11} \log{\left (i \sqrt{c} + x \right )}}{- 2 c^{\frac{21}{2}} + 2 c^{\frac{17}{2}} x^{4}} - \frac{2 c^{11} \operatorname{atanh}{\left (\frac{c}{x^{2}} \right )}}{- 2 c^{\frac{21}{2}} + 2 c^{\frac{17}{2}} x^{4}} + \frac{2 c^{9} x^{4} \log{\left (- \sqrt{c} + x \right )}}{- 2 c^{\frac{21}{2}} + 2 c^{\frac{17}{2}} x^{4}} - \frac{c^{9} x^{4} \log{\left (- i \sqrt{c} + x \right )}}{- 2 c^{\frac{21}{2}} + 2 c^{\frac{17}{2}} x^{4}} - \frac{i c^{9} x^{4} \log{\left (- i \sqrt{c} + x \right )}}{- 2 c^{\frac{21}{2}} + 2 c^{\frac{17}{2}} x^{4}} - \frac{c^{9} x^{4} \log{\left (i \sqrt{c} + x \right )}}{- 2 c^{\frac{21}{2}} + 2 c^{\frac{17}{2}} x^{4}} + \frac{i c^{9} x^{4} \log{\left (i \sqrt{c} + x \right )}}{- 2 c^{\frac{21}{2}} + 2 c^{\frac{17}{2}} x^{4}} + \frac{2 c^{9} x^{4} \operatorname{atanh}{\left (\frac{c}{x^{2}} \right )}}{- 2 c^{\frac{21}{2}} + 2 c^{\frac{17}{2}} x^{4}} & \text{otherwise} \end{cases}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+b*atanh(c/x**2),x)

[Out]

a*x + b*Piecewise((0, Eq(c, 0)), (-oo*x, Eq(c, -x**2)), (oo*x, Eq(c, x**2)), (-2*c**(21/2)*x*atanh(c/x**2)/(-2
*c**(21/2) + 2*c**(17/2)*x**4) + 2*c**(17/2)*x**5*atanh(c/x**2)/(-2*c**(21/2) + 2*c**(17/2)*x**4) - 2*c**11*lo
g(-sqrt(c) + x)/(-2*c**(21/2) + 2*c**(17/2)*x**4) + c**11*log(-I*sqrt(c) + x)/(-2*c**(21/2) + 2*c**(17/2)*x**4
) + I*c**11*log(-I*sqrt(c) + x)/(-2*c**(21/2) + 2*c**(17/2)*x**4) + c**11*log(I*sqrt(c) + x)/(-2*c**(21/2) + 2
*c**(17/2)*x**4) - I*c**11*log(I*sqrt(c) + x)/(-2*c**(21/2) + 2*c**(17/2)*x**4) - 2*c**11*atanh(c/x**2)/(-2*c*
*(21/2) + 2*c**(17/2)*x**4) + 2*c**9*x**4*log(-sqrt(c) + x)/(-2*c**(21/2) + 2*c**(17/2)*x**4) - c**9*x**4*log(
-I*sqrt(c) + x)/(-2*c**(21/2) + 2*c**(17/2)*x**4) - I*c**9*x**4*log(-I*sqrt(c) + x)/(-2*c**(21/2) + 2*c**(17/2
)*x**4) - c**9*x**4*log(I*sqrt(c) + x)/(-2*c**(21/2) + 2*c**(17/2)*x**4) + I*c**9*x**4*log(I*sqrt(c) + x)/(-2*
c**(21/2) + 2*c**(17/2)*x**4) + 2*c**9*x**4*atanh(c/x**2)/(-2*c**(21/2) + 2*c**(17/2)*x**4), True))

________________________________________________________________________________________

Giac [A]  time = 1.21485, size = 77, normalized size = 1.75 \begin{align*} \frac{1}{2} \,{\left (2 \, c{\left (\frac{\arctan \left (\frac{x}{\sqrt{-c}}\right )}{\sqrt{-c}} + \frac{\arctan \left (\frac{x}{\sqrt{c}}\right )}{\sqrt{c}}\right )} + x \log \left (-\frac{\frac{c}{x^{2}} + 1}{\frac{c}{x^{2}} - 1}\right )\right )} b + a x \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(a+b*arctanh(c/x^2),x, algorithm="giac")

[Out]

1/2*(2*c*(arctan(x/sqrt(-c))/sqrt(-c) + arctan(x/sqrt(c))/sqrt(c)) + x*log(-(c/x^2 + 1)/(c/x^2 - 1)))*b + a*x